﻿using System.Collections.Generic;
using System.ServiceModel;
using Pku.BookStore.Model;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "IOrderDetailServices", Namespace = "Pku.BookStore.IServices")]
    public interface IOrderDetailServices
    {
        /// <summary>
        /// 增加订单详情信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(OrderDetailModel entity);

        /// <summary>
        /// 修改订单详情信息
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(OrderDetailModel entity);

        /// <summary>
        /// 搜索订单详情
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<OrderDetailModel> Search(OrderDetailParam param);

        /// <summary>
        /// 获取订单详情实体
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        OrderDetailModel GetEntityById(int orderID);

        /// <summary>
        /// 获取订单详情实体
        /// </summary>
        /// <param name="orderID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetListById")]
        List<OrderDetailModel> GetListById(int orderID);

    }
}
